import com.chai.config.SpringConfig;
import com.chai.domain.Brand;
import com.chai.service.BrandService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import java.util.List;

public class App {
    public static void main(String[] args) {
        ApplicationContext apc = new AnnotationConfigApplicationContext(SpringConfig.class);
        BrandService brandService = (BrandService) apc.getBean("brandService");
        List<Brand> brands = brandService.selectAll();
        System.out.println(brands);
    }
}
